// 生成随机数
const generateRandomString = (length) => {
  const chars = "abcdefghijklmnopqrstuvwxyz0123456789";
  let newString = "";
  for (let i = 0; i < length; i++) {
    newString += chars.charAt(Math.floor(Math.random() * chars.length));
  }
  return newString;
};

const randomString = (stringLength) => {
  const firstChar = String.fromCharCode(Math.floor(Math.random() * 26) + 97); // 随机生成小写字母
  return `${firstChar}${generateRandomString(stringLength - 1)}`;
};

export default randomString;
